<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<title>渠道添加</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="//at.alicdn.com/t/font_eolqem241z66flxr.css" media="all" />
</head>
<body class="childrenBody">
	<form class="layui-form" method="post" id="form" th:action="@{/admin/card/save}" >
		<input type="hidden" class="id" th:value="${card?.id}" name="id"/>
		<div class="layui-form-item">
			<label class="layui-form-label">标题</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input title" name="title" lay-verify="required" placeholder=""  th:value="${card?.title}">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">简介</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input info" name="info" lay-verify="required" placeholder="" th:value="${card?.info}">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">链接</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input link" name="link" lay-verify="required" placeholder="" th:value="${card?.link}">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">排序</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input sort" name="sort" lay-verify="required" placeholder="" th:value="${card?.sort}">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">logo</label>
			<input type="file" name="file" class="layui-upload-file" lay-title="">
			<img th:src="${card?.logo}" class="layui-circle" sytle="width:50px;height:50px">
			<input type="hidden" class="logo" name="logo" th:value="${card?.logo}">
		</div>

		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit="" lay-filter="addCard">立即提交</button>
				<!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
		    </div>
		</div>
	</form>
	<script type="text/javascript" th:src="@{/layui/layui.js}"></script>
	<script type="text/javascript" th:src="@{/js/card/add.js}"></script>
</body>
</html>